<template>
	<view class="bg">
		<image src="../../static/image/11.png" mode="widthFix" class="img"></image>
		<view class="hide"></view>
	</view>
	<u-navbar
	title=""
	:autoBack="true"
	:background="{
	background:'transparent'
	}"
	:border-bottom="false"
	titleSize="28rpx" titleColor="#333"
	back-icon-color="#333"
	:isBack="false"
	:isFixed="false"
	/>
	<view class="container pl30 pr30">
		<view class="user t-flex">
			<uv-image :src="$str.avatar(store.userinfo?.avatar)" mode="aspectFill"
			width="130rpx"
			height="130rpx"
			radius="50%"
			@click="$go(store.userinfo?'/pages/public/set':'/pages/public/login')"
			></uv-image>
			<view class="f40 c3 bold ml30">
				{{store.userinfo?.nickname || '未登录'}}
			</view>
		</view>
		
		<view class="bgf r20 t-flex between action">
			<needLogin @onClick="$go('/pages/share/share')">
				<view class="item t-flex colum" >
					<image src="../../static/icons/10.png" mode="aspectFit" class="img"></image>
					<view class="c6 mt30">
						推广拉新
					</view>
				</view>
			</needLogin>
			<needLogin @onClick="$go('/pages/order/order')">
				<view class="item t-flex colum" >
					<image src="../../static/icons/08.png" mode="aspectFit" class="img"></image>
					<view class="c6 mt30">
						陪驾订单
					</view>
				</view>
			</needLogin>
			<needLogin @onClick="$go('/pages/coupon/coupon')">
				<view class="item t-flex colum" >
					<image src="../../static/icons/09.png" mode="aspectFit" class="img"></image>
					<view class="c6 mt30">
						优惠券
					</view>
				</view>
			</needLogin>
		</view>
		
		<view class="bgf list r20 pl30 pr30 mt20">
			<view class="li t-flex between" @click="$go('/pages/public/onePage?key=ppjs')">
				<view class="t-flex">
					<image src="../../static/icons/11.png" mode="aspectFit" class="icon"></image>
					<view class="ml20">
						品牌介绍
					</view>
				</view>
				<text class="iconfont icon-xiangyou1"></text>
			</view>
			<view class="li t-flex between" @click="phoneCall(store.config.phone)">
				<view class="t-flex">
					<image src="../../static/icons/12.png" mode="aspectFit" class="icon"></image>
					<view class="ml20">
						联系我们
					</view>
				</view>
				<text class="iconfont icon-xiangyou1"></text>
			</view>
			<view class="li t-flex between" @click="$go('/pages/public/onePage?key=bxfw')"
			v-if="store.config.bxfw"
			>
				<view class="t-flex">
					<image src="../../static/icons/13.png" mode="aspectFit" class="icon"></image>
					<view class="ml20">
						保险服务
					</view>
				</view>
				<text class="iconfont icon-xiangyou1"></text>
			</view>
			<view class="li t-flex between" @click="$go('/pages/public/onePage?key=pjxy')"
			v-if="store.config.pjxy"
			>
				<view class="t-flex">
					<image src="../../static/icons/14.png" mode="aspectFit" class="icon"></image>
					<view class="ml20">
						陪驾协议
					</view>
				</view>
				<text class="iconfont icon-xiangyou1"></text>
			</view>
			<view class="li t-flex between" @click="$go('/pages/public/opinion')">
				<view class="t-flex">
					<image src="../../static/icons/15.png" mode="aspectFit" class="icon"></image>
					<view class="ml20">
						意见反馈
					</view>
				</view>
				<text class="iconfont icon-xiangyou1"></text>
			</view>
			<view class="li t-flex between" @click="changeClient" v-if="store.userinfo?.is_sf">
				<view class="t-flex">
					<image src="../../static/icons/28.png" mode="aspectFit" class="icon"></image>
					<view class="ml20">
						师傅端
					</view>
				</view>
				<text class="iconfont icon-xiangyou1"></text>
			</view>
		</view>
		
	</view>
</template>

<script setup lang="ts">
import { phoneCall } from '../../lib/ts/util';
import { useStore } from '../../store';
import { onShow } from "@dcloudio/uni-app"

	
	
	const store = useStore()
	
	onShow(()=>{
		store.getUserinfo()
	})
	
	
	
	const changeClient = ()=>{
		uni.reLaunch({
			url:'/pages/workerClient/index'
		})
	}
	
</script>

<style scoped lang="scss">
	.bg{
		width: 100%;
		position: absolute;
		.img{
			width: 100%;
		}
		.hide{
			width: 100%;
			height: 210rpx;
			background: #F5F6F7;
			border-radius: 16rpx;
			filter: blur(10px);
			margin-top: -100rpx;
		}
	}
	.container{
		position: relative;
		z-index: 2;
		padding-top: 40rpx;
	}
	
	.action{
		padding: 40rpx;
		margin-top: 40rpx;
		.img{
			width: 110rpx;
			height: 110rpx;
		}
	}
	
	.list{
		.li{
			padding: 40rpx 0 ;
			border-bottom: 2rpx solid #EDEDED;
			.icon{
				width: 32rpx;
				height: 32rpx;
			}
			.iconfont{
				color: #999;
			}
			&:last-child{
				border: none;
			}
		}
	}

</style>
